<?php

class Bet_Model_UserGroupMapper extends Bet_Model_Mapper {

	public function __construct() {
		$this->setDbTableName("Bet_Model_DbTable_UserGroup");
		$this->setId('user_id');
	}

	/**
	 * Save or update an model object of a db instance
	 * @var Bet_Model_UserGroup $userGroup
	 * @return boolean Saving result - TRUE if successed, otherwise FALSE
	 */
	public function save(Bet_Model_UserGroup $userGroup) {
		$data = array(
			"user_group_id" => $userGroup->getUserGroupId(),
			"user_id" => $userGroup->getUserId(),
			"group_id" => $userGroup->getGroupId()
		);
		return parent::save($data);
	}

}

